package org.test.ping.task;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.test.ping.service.PingService;

/**
 * @ClassName TaskForPing
 * @Description TODO
 * @Author JiaLin
 * @Date 2024/11/21 9:43
 */
public class TaskForPing extends QuartzJobBean {

    @Autowired
    private PingService pingService;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //TODO 定时任务的执行逻辑
        pingService.sayHello();
        //System.out.println("定时任务执行时间："+new Date().toLocaleString());
    }

}
